<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{URL::asset('css/user/salesman.css')}}">
<div class="salesman_box">
    <h1>权限解绑</h1>
    <form class="cmxform name" id="salesman_pop" method="post" action="">
        {{csrf_field()}}
        <p><label>姓名：{{$name}}<input type="hidden" value="{{$name}}" name="main"/></label></p>
        <p><label>权限：主营业务员</label></p>
        <p>
            <label for="change_main">变更业务员：</label>
            <select name="change_main" required>
                <option>--请选择--</option>
                @foreach($sale as $v)
                    <option value="{{$v->name}}">{{$v->name}}</option>
                @endforeach
            </select>
        </p>
        <p style="text-align: center;"><input type="submit" value="保存提交" class="submit submit_btn"></p>
    </form>
    @include('flash::message')
</div>

<script type="text/javascript" src="{{asset('/common/js/jquery.min.js')}}"></script>
<script type="text/javascript" src="{{URL::asset('js/user/salesman.js')}}"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="{{asset('/common/js/validation/jquery.validate.min.js')}}"></script>
<script src="{{asset('/common/js/validation/localization/messages_zh.min.js')}}"></script>
<script>
    // $('#flash-overlay-modal').modal();
    // 表单验证
    $(function(){
        $('#salesman_pop').validate({
            rules: {
                change_main: {
                    required: true,
                }
            },
            message: {
                change_main: {
                    required: "请选择要变更的业务员",
                }
            }
        })
    })


</script>


